Page({
  data:{
    login:{
      user_id:"",
      user_name:"",
      user_img:"",
      user_point:"",
    buttonDisabled:false,
    modalHidden:true,
    show:false
    },
    isLogin:0
  },
  onLoad:function(){
    console.log(wx.getStorageSync("city_id"))
    console.log(12)
    this.setData({
      login:{
        user_id:wx.getStorageSync("user_id"),
        user_name:wx.getStorageSync("user_name"),
        user_img:wx.getStorageSync("user_img"),
        user_point:wx.getStorageSync("user_point"),
      }
    })
    if(this.data.login.user_id){
      this.setData({
        isLogin:1
      })
    }else{
      this.setData({
        isLogin:0
      })
    }
    console.log(this.data.login)
  },
  outgin_FN:function(){

  },
  show_FN:function(){
    wx.showModal({
      "title":"通知",
      "content":"请至“汉腾汽车公众号-个人中心”进行咨询管理",
      "showCancel":false,
      "mask":true
    }) 
  },
 outgin_FN:function(){
    this.setData({
      modalHidden:!this.data.modalHidden
    })
  },
  modalBindaconfirm:function(){
     this.setData({
      modalHidden:!this.data.modalHidden,
      show:!this.data.show,
      tip:'您点击了【确认】按钮！',
      buttonDisabled:!this.data.buttonDisabled,
    });
    wx.removeStorageSync("user_id");
    wx.removeStorageSync("user_name");
    wx.removeStorageSync("user_img");
    wx.removeStorageSync("user_point");
    this.setData({
      login:{
        user_id:wx.getStorageSync("user_id"),
        user_name:wx.getStorageSync("user_name"),
        user_img:wx.getStorageSync("user_img"),
        user_point:wx.getStorageSync("user_point"),
      }
    })
    if(this.data.login.user_id){
      this.setData({
        isLogin:1
      })
    }else{
      this.setData({
        isLogin:0
      })
    }
    wx.reLaunch({
      url: '/pages/list/list'
    })

  },
  modalBindcancel:function(){
     this.setData({
      modalHidden:!this.data.modalHidden,
      tip:'您点击了【取消】按钮！'
    })
      modalHidden = fasle;
  }
        
})